<ng-container *ngIf="toggle; else toggleOff">
  <p>The toggle is on.</p>
</ng-container>
<ng-template #toggleOff>
  <p>The toggle is off.</p>
</ng-template>
<button (click)="onToggle()">Toggle</button>